// Copyright 2021-2023 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// @generated by protoc-gen-es v1.4.1 with parameter "ts_nocheck=false,target=ts"
// @generated from file google/protobuf/test_messages_proto3.proto (package protobuf_test_messages.proto3, syntax proto3)
/* eslint-disable */

import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "npm:@bufbuild/protobuf";
import { Any, BoolValue, BytesValue, DoubleValue, Duration, FieldMask, FloatValue, Int32Value, Int64Value, ListValue, Message, NullValue, proto3, protoInt64, StringValue, Struct, Timestamp, UInt32Value, UInt64Value, Value } from "npm:@bufbuild/protobuf";

/**
 * @generated from enum protobuf_test_messages.proto3.ForeignEnum
 */
export enum ForeignEnum {
  /**
   * @generated from enum value: FOREIGN_FOO = 0;
   */
  FOREIGN_FOO = 0,

  /**
   * @generated from enum value: FOREIGN_BAR = 1;
   */
  FOREIGN_BAR = 1,

  /**
   * @generated from enum value: FOREIGN_BAZ = 2;
   */
  FOREIGN_BAZ = 2,
}
// Retrieve enum metadata with: proto3.getEnumType(ForeignEnum)
proto3.util.setEnumType(ForeignEnum, "protobuf_test_messages.proto3.ForeignEnum", [
  { no: 0, name: "FOREIGN_FOO" },
  { no: 1, name: "FOREIGN_BAR" },
  { no: 2, name: "FOREIGN_BAZ" },
]);

/**
 * This proto includes every type of field in both singular and repeated
 * forms.
 *
 * Also, crucially, all messages and enums in this file are eventually
 * submessages of this message.  So for example, a fuzz test of TestAllTypes
 * could trigger bugs that occur in any message type in this file.  We verify
 * this stays true in a unit test.
 *
 * @generated from message protobuf_test_messages.proto3.TestAllTypesProto3
 */
export class TestAllTypesProto3 extends Message<TestAllTypesProto3> {
  /**
   * Singular
   *
   * @generated from field: int32 optional_int32 = 1;
   */
  optionalInt32 = 0;

  /**
   * @generated from field: int64 optional_int64 = 2;
   */
  optionalInt64 = protoInt64.zero;

  /**
   * @generated from field: uint32 optional_uint32 = 3;
   */
  optionalUint32 = 0;

  /**
   * @generated from field: uint64 optional_uint64 = 4;
   */
  optionalUint64 = protoInt64.zero;

  /**
   * @generated from field: sint32 optional_sint32 = 5;
   */
  optionalSint32 = 0;

  /**
   * @generated from field: sint64 optional_sint64 = 6;
   */
  optionalSint64 = protoInt64.zero;

  /**
   * @generated from field: fixed32 optional_fixed32 = 7;
   */
  optionalFixed32 = 0;

  /**
   * @generated from field: fixed64 optional_fixed64 = 8;
   */
  optionalFixed64 = protoInt64.zero;

  /**
   * @generated from field: sfixed32 optional_sfixed32 = 9;
   */
  optionalSfixed32 = 0;

  /**
   * @generated from field: sfixed64 optional_sfixed64 = 10;
   */
  optionalSfixed64 = protoInt64.zero;

  /**
   * @generated from field: float optional_float = 11;
   */
  optionalFloat = 0;

  /**
   * @generated from field: double optional_double = 12;
   */
  optionalDouble = 0;

  /**
   * @generated from field: bool optional_bool = 13;
   */
  optionalBool = false;

  /**
   * @generated from field: string optional_string = 14;
   */
  optionalString = "";

  /**
   * @generated from field: bytes optional_bytes = 15;
   */
  optionalBytes = new Uint8Array(0);

  /**
   * @generated from field: protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage optional_nested_message = 18;
   */
  optionalNestedMessage?: TestAllTypesProto3_NestedMessage;

  /**
   * @generated from field: protobuf_test_messages.proto3.ForeignMessage optional_foreign_message = 19;
   */
  optionalForeignMessage?: ForeignMessage;

  /**
   * @generated from field: protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum optional_nested_enum = 21;
   */
  optionalNestedEnum = TestAllTypesProto3_NestedEnum.FOO;

  /**
   * @generated from field: protobuf_test_messages.proto3.ForeignEnum optional_foreign_enum = 22;
   */
  optionalForeignEnum = ForeignEnum.FOREIGN_FOO;

  /**
   * @generated from field: protobuf_test_messages.proto3.TestAllTypesProto3.AliasedEnum optional_aliased_enum = 23;
   */
  optionalAliasedEnum = TestAllTypesProto3_AliasedEnum.ALIAS_FOO;

  /**
   * @generated from field: string optional_string_piece = 24;
   */
  optionalStringPiece = "";

  /**
   * @generated from field: string optional_cord = 25;
   */
  optionalCord = "";

  /**
   * @generated from field: protobuf_test_messages.proto3.TestAllTypesProto3 recursive_message = 27;
   */
  recursiveMessage?: TestAllTypesProto3;

  /**
   * Repeated
   *
   * @generated from field: repeated int32 repeated_int32 = 31;
   */
  repeatedInt32: number[] = [];

  /**
   * @generated from field: repeated int64 repeated_int64 = 32;
   */
  repeatedInt64: bigint[] = [];

  /**
   * @generated from field: repeated uint32 repeated_uint32 = 33;
   */
  repeatedUint32: number[] = [];

  /**
   * @generated from field: repeated uint64 repeated_uint64 = 34;
   */
  repeatedUint64: bigint[] = [];

  /**
   * @generated from field: repeated sint32 repeated_sint32 = 35;
   */
  repeatedSint32: number[] = [];

  /**
   * @generated from field: repeated sint64 repeated_sint64 = 36;
   */
  repeatedSint64: bigint[] = [];

  /**
   * @generated from field: repeated fixed32 repeated_fixed32 = 37;
   */
  repeatedFixed32: number[] = [];

  /**
   * @generated from field: repeated fixed64 repeated_fixed64 = 38;
   */
  repeatedFixed64: bigint[] = [];

  /**
   * @generated from field: repeated sfixed32 repeated_sfixed32 = 39;
   */
  repeatedSfixed32: number[] = [];

  /**
   * @generated from field: repeated sfixed64 repeated_sfixed64 = 40;
   */
  repeatedSfixed64: bigint[] = [];

  /**
   * @generated from field: repeated float repeated_float = 41;
   */
  repeatedFloat: number[] = [];

  /**
   * @generated from field: repeated double repeated_double = 42;
   */
  repeatedDouble: number[] = [];

  /**
   * @generated from field: repeated bool repeated_bool = 43;
   */
  repeatedBool: boolean[] = [];

  /**
   * @generated from field: repeated string repeated_string = 44;
   */
  repeatedString: string[] = [];

  /**
   * @generated from field: repeated bytes repeated_bytes = 45;
   */
  repeatedBytes: Uint8Array[] = [];

  /**
   * @generated from field: repeated protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage repeated_nested_message = 48;
   */
  repeatedNestedMessage: TestAllTypesProto3_NestedMessage[] = [];

  /**
   * @generated from field: repeated protobuf_test_messages.proto3.ForeignMessage repeated_foreign_message = 49;
   */
  repeatedForeignMessage: ForeignMessage[] = [];

  /**
   * @generated from field: repeated protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum repeated_nested_enum = 51;
   */
  repeatedNestedEnum: TestAllTypesProto3_NestedEnum[] = [];

  /**
   * @generated from field: repeated protobuf_test_messages.proto3.ForeignEnum repeated_foreign_enum = 52;
   */
  repeatedForeignEnum: ForeignEnum[] = [];

  /**
   * @generated from field: repeated string repeated_string_piece = 54;
   */
  repeatedStringPiece: string[] = [];

  /**
   * @generated from field: repeated string repeated_cord = 55;
   */
  repeatedCord: string[] = [];

  /**
   * Packed
   *
   * @generated from field: repeated int32 packed_int32 = 75 [packed = true];
   */
  packedInt32: number[] = [];

  /**
   * @generated from field: repeated int64 packed_int64 = 76 [packed = true];
   */
  packedInt64: bigint[] = [];

  /**
   * @generated from field: repeated uint32 packed_uint32 = 77 [packed = true];
   */
  packedUint32: number[] = [];

  /**
   * @generated from field: repeated uint64 packed_uint64 = 78 [packed = true];
   */
  packedUint64: bigint[] = [];

  /**
   * @generated from field: repeated sint32 packed_sint32 = 79 [packed = true];
   */
  packedSint32: number[] = [];

  /**
   * @generated from field: repeated sint64 packed_sint64 = 80 [packed = true];
   */
  packedSint64: bigint[] = [];

  /**
   * @generated from field: repeated fixed32 packed_fixed32 = 81 [packed = true];
   */
  packedFixed32: number[] = [];

  /**
   * @generated from field: repeated fixed64 packed_fixed64 = 82 [packed = true];
   */
  packedFixed64: bigint[] = [];

  /**
   * @generated from field: repeated sfixed32 packed_sfixed32 = 83 [packed = true];
   */
  packedSfixed32: number[] = [];

  /**
   * @generated from field: repeated sfixed64 packed_sfixed64 = 84 [packed = true];
   */
  packedSfixed64: bigint[] = [];

  /**
   * @generated from field: repeated float packed_float = 85 [packed = true];
   */
  packedFloat: number[] = [];

  /**
   * @generated from field: repeated double packed_double = 86 [packed = true];
   */
  packedDouble: number[] = [];

  /**
   * @generated from field: repeated bool packed_bool = 87 [packed = true];
   */
  packedBool: boolean[] = [];

  /**
   * @generated from field: repeated protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum packed_nested_enum = 88 [packed = true];
   */
  packedNestedEnum: TestAllTypesProto3_NestedEnum[] = [];

  /**
   * Unpacked
   *
   * @generated from field: repeated int32 unpacked_int32 = 89 [packed = false];
   */
  unpackedInt32: number[] = [];

  /**
   * @generated from field: repeated int64 unpacked_int64 = 90 [packed = false];
   */
  unpackedInt64: bigint[] = [];

  /**
   * @generated from field: repeated uint32 unpacked_uint32 = 91 [packed = false];
   */
  unpackedUint32: number[] = [];

  /**
   * @generated from field: repeated uint64 unpacked_uint64 = 92 [packed = false];
   */
  unpackedUint64: bigint[] = [];

  /**
   * @generated from field: repeated sint32 unpacked_sint32 = 93 [packed = false];
   */
  unpackedSint32: number[] = [];

  /**
   * @generated from field: repeated sint64 unpacked_sint64 = 94 [packed = false];
   */
  unpackedSint64: bigint[] = [];

  /**
   * @generated from field: repeated fixed32 unpacked_fixed32 = 95 [packed = false];
   */
  unpackedFixed32: number[] = [];

  /**
   * @generated from field: repeated fixed64 unpacked_fixed64 = 96 [packed = false];
   */
  unpackedFixed64: bigint[] = [];

  /**
   * @generated from field: repeated sfixed32 unpacked_sfixed32 = 97 [packed = false];
   */
  unpackedSfixed32: number[] = [];

  /**
   * @generated from field: repeated sfixed64 unpacked_sfixed64 = 98 [packed = false];
   */
  unpackedSfixed64: bigint[] = [];

  /**
   * @generated from field: repeated float unpacked_float = 99 [packed = false];
   */
  unpackedFloat: number[] = [];

  /**
   * @generated from field: repeated double unpacked_double = 100 [packed = false];
   */
  unpackedDouble: number[] = [];

  /**
   * @generated from field: repeated bool unpacked_bool = 101 [packed = false];
   */
  unpackedBool: boolean[] = [];

  /**
   * @generated from field: repeated protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum unpacked_nested_enum = 102 [packed = false];
   */
  unpackedNestedEnum: TestAllTypesProto3_NestedEnum[] = [];

  /**
   * Map
   *
   * @generated from field: map<int32, int32> map_int32_int32 = 56;
   */
  mapInt32Int32: { [key: number]: number } = {};

  /**
   * @generated from field: map<int64, int64> map_int64_int64 = 57;
   */
  mapInt64Int64: { [key: string]: bigint } = {};

  /**
   * @generated from field: map<uint32, uint32> map_uint32_uint32 = 58;
   */
  mapUint32Uint32: { [key: number]: number } = {};

  /**
   * @generated from field: map<uint64, uint64> map_uint64_uint64 = 59;
   */
  mapUint64Uint64: { [key: string]: bigint } = {};

  /**
   * @generated from field: map<sint32, sint32> map_sint32_sint32 = 60;
   */
  mapSint32Sint32: { [key: number]: number } = {};

  /**
   * @generated from field: map<sint64, sint64> map_sint64_sint64 = 61;
   */
  mapSint64Sint64: { [key: string]: bigint } = {};

  /**
   * @generated from field: map<fixed32, fixed32> map_fixed32_fixed32 = 62;
   */
  mapFixed32Fixed32: { [key: number]: number } = {};

  /**
   * @generated from field: map<fixed64, fixed64> map_fixed64_fixed64 = 63;
   */
  mapFixed64Fixed64: { [key: string]: bigint } = {};

  /**
   * @generated from field: map<sfixed32, sfixed32> map_sfixed32_sfixed32 = 64;
   */
  mapSfixed32Sfixed32: { [key: number]: number } = {};

  /**
   * @generated from field: map<sfixed64, sfixed64> map_sfixed64_sfixed64 = 65;
   */
  mapSfixed64Sfixed64: { [key: string]: bigint } = {};

  /**
   * @generated from field: map<int32, float> map_int32_float = 66;
   */
  mapInt32Float: { [key: number]: number } = {};

  /**
   * @generated from field: map<int32, double> map_int32_double = 67;
   */
  mapInt32Double: { [key: number]: number } = {};

  /**
   * @generated from field: map<bool, bool> map_bool_bool = 68;
   */
  mapBoolBool: { [key: string]: boolean } = {};

  /**
   * @generated from field: map<string, string> map_string_string = 69;
   */
  mapStringString: { [key: string]: string } = {};

  /**
   * @generated from field: map<string, bytes> map_string_bytes = 70;
   */
  mapStringBytes: { [key: string]: Uint8Array } = {};

  /**
   * @generated from field: map<string, protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage> map_string_nested_message = 71;
   */
  mapStringNestedMessage: { [key: string]: TestAllTypesProto3_NestedMessage } = {};

  /**
   * @generated from field: map<string, protobuf_test_messages.proto3.ForeignMessage> map_string_foreign_message = 72;
   */
  mapStringForeignMessage: { [key: string]: ForeignMessage } = {};

  /**
   * @generated from field: map<string, protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum> map_string_nested_enum = 73;
   */
  mapStringNestedEnum: { [key: string]: TestAllTypesProto3_NestedEnum } = {};

  /**
   * @generated from field: map<string, protobuf_test_messages.proto3.ForeignEnum> map_string_foreign_enum = 74;
   */
  mapStringForeignEnum: { [key: string]: ForeignEnum } = {};

  /**
   * @generated from oneof protobuf_test_messages.proto3.TestAllTypesProto3.oneof_field
   */
  oneofField: {
    /**
     * @generated from field: uint32 oneof_uint32 = 111;
     */
    value: number;
    case: "oneofUint32";
  } | {
    /**
     * @generated from field: protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage oneof_nested_message = 112;
     */
    value: TestAllTypesProto3_NestedMessage;
    case: "oneofNestedMessage";
  } | {
    /**
     * @generated from field: string oneof_string = 113;
     */
    value: string;
    case: "oneofString";
  } | {
    /**
     * @generated from field: bytes oneof_bytes = 114;
     */
    value: Uint8Array;
    case: "oneofBytes";
  } | {
    /**
     * @generated from field: bool oneof_bool = 115;
     */
    value: boolean;
    case: "oneofBool";
  } | {
    /**
     * @generated from field: uint64 oneof_uint64 = 116;
     */
    value: bigint;
    case: "oneofUint64";
  } | {
    /**
     * @generated from field: float oneof_float = 117;
     */
    value: number;
    case: "oneofFloat";
  } | {
    /**
     * @generated from field: double oneof_double = 118;
     */
    value: number;
    case: "oneofDouble";
  } | {
    /**
     * @generated from field: protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum oneof_enum = 119;
     */
    value: TestAllTypesProto3_NestedEnum;
    case: "oneofEnum";
  } | {
    /**
     * @generated from field: google.protobuf.NullValue oneof_null_value = 120;
     */
    value: NullValue;
    case: "oneofNullValue";
  } | { case: undefined; value?: undefined } = { case: undefined };

  /**
   * Well-known types
   *
   * @generated from field: google.protobuf.BoolValue optional_bool_wrapper = 201;
   */
  optionalBoolWrapper?: boolean;

  /**
   * @generated from field: google.protobuf.Int32Value optional_int32_wrapper = 202;
   */
  optionalInt32Wrapper?: number;

  /**
   * @generated from field: google.protobuf.Int64Value optional_int64_wrapper = 203;
   */
  optionalInt64Wrapper?: bigint;

  /**
   * @generated from field: google.protobuf.UInt32Value optional_uint32_wrapper = 204;
   */
  optionalUint32Wrapper?: number;

  /**
   * @generated from field: google.protobuf.UInt64Value optional_uint64_wrapper = 205;
   */
  optionalUint64Wrapper?: bigint;

  /**
   * @generated from field: google.protobuf.FloatValue optional_float_wrapper = 206;
   */
  optionalFloatWrapper?: number;

  /**
   * @generated from field: google.protobuf.DoubleValue optional_double_wrapper = 207;
   */
  optionalDoubleWrapper?: number;

  /**
   * @generated from field: google.protobuf.StringValue optional_string_wrapper = 208;
   */
  optionalStringWrapper?: string;

  /**
   * @generated from field: google.protobuf.BytesValue optional_bytes_wrapper = 209;
   */
  optionalBytesWrapper?: Uint8Array;

  /**
   * @generated from field: repeated google.protobuf.BoolValue repeated_bool_wrapper = 211;
   */
  repeatedBoolWrapper: BoolValue[] = [];

  /**
   * @generated from field: repeated google.protobuf.Int32Value repeated_int32_wrapper = 212;
   */
  repeatedInt32Wrapper: Int32Value[] = [];

  /**
   * @generated from field: repeated google.protobuf.Int64Value repeated_int64_wrapper = 213;
   */
  repeatedInt64Wrapper: Int64Value[] = [];

  /**
   * @generated from field: repeated google.protobuf.UInt32Value repeated_uint32_wrapper = 214;
   */
  repeatedUint32Wrapper: UInt32Value[] = [];

  /**
   * @generated from field: repeated google.protobuf.UInt64Value repeated_uint64_wrapper = 215;
   */
  repeatedUint64Wrapper: UInt64Value[] = [];

  /**
   * @generated from field: repeated google.protobuf.FloatValue repeated_float_wrapper = 216;
   */
  repeatedFloatWrapper: FloatValue[] = [];

  /**
   * @generated from field: repeated google.protobuf.DoubleValue repeated_double_wrapper = 217;
   */
  repeatedDoubleWrapper: DoubleValue[] = [];

  /**
   * @generated from field: repeated google.protobuf.StringValue repeated_string_wrapper = 218;
   */
  repeatedStringWrapper: StringValue[] = [];

  /**
   * @generated from field: repeated google.protobuf.BytesValue repeated_bytes_wrapper = 219;
   */
  repeatedBytesWrapper: BytesValue[] = [];

  /**
   * @generated from field: google.protobuf.Duration optional_duration = 301;
   */
  optionalDuration?: Duration;

  /**
   * @generated from field: google.protobuf.Timestamp optional_timestamp = 302;
   */
  optionalTimestamp?: Timestamp;

  /**
   * @generated from field: google.protobuf.FieldMask optional_field_mask = 303;
   */
  optionalFieldMask?: FieldMask;

  /**
   * @generated from field: google.protobuf.Struct optional_struct = 304;
   */
  optionalStruct?: Struct;

  /**
   * @generated from field: google.protobuf.Any optional_any = 305;
   */
  optionalAny?: Any;

  /**
   * @generated from field: google.protobuf.Value optional_value = 306;
   */
  optionalValue?: Value;

  /**
   * @generated from field: google.protobuf.NullValue optional_null_value = 307;
   */
  optionalNullValue = NullValue.NULL_VALUE;

  /**
   * @generated from field: repeated google.protobuf.Duration repeated_duration = 311;
   */
  repeatedDuration: Duration[] = [];

  /**
   * @generated from field: repeated google.protobuf.Timestamp repeated_timestamp = 312;
   */
  repeatedTimestamp: Timestamp[] = [];

  /**
   * @generated from field: repeated google.protobuf.FieldMask repeated_fieldmask = 313;
   */
  repeatedFieldmask: FieldMask[] = [];

  /**
   * @generated from field: repeated google.protobuf.Struct repeated_struct = 324;
   */
  repeatedStruct: Struct[] = [];

  /**
   * @generated from field: repeated google.protobuf.Any repeated_any = 315;
   */
  repeatedAny: Any[] = [];

  /**
   * @generated from field: repeated google.protobuf.Value repeated_value = 316;
   */
  repeatedValue: Value[] = [];

  /**
   * @generated from field: repeated google.protobuf.ListValue repeated_list_value = 317;
   */
  repeatedListValue: ListValue[] = [];

  /**
   * Test field-name-to-JSON-name convention.
   * (protobuf says names can be any valid C/C++ identifier.)
   *
   * @generated from field: int32 fieldname1 = 401;
   */
  fieldname1 = 0;

  /**
   * @generated from field: int32 field_name2 = 402;
   */
  fieldName2 = 0;

  /**
   * @generated from field: int32 _field_name3 = 403;
   */
  FieldName3 = 0;

  /**
   * @generated from field: int32 field__name4_ = 404;
   */
  fieldName4 = 0;

  /**
   * @generated from field: int32 field0name5 = 405;
   */
  field0name5 = 0;

  /**
   * @generated from field: int32 field_0_name6 = 406;
   */
  field0Name6 = 0;

  /**
   * @generated from field: int32 fieldName7 = 407;
   */
  fieldName7 = 0;

  /**
   * @generated from field: int32 FieldName8 = 408;
   */
  FieldName8 = 0;

  /**
   * @generated from field: int32 field_Name9 = 409;
   */
  fieldName9 = 0;

  /**
   * @generated from field: int32 Field_Name10 = 410;
   */
  FieldName10 = 0;

  /**
   * @generated from field: int32 FIELD_NAME11 = 411;
   */
  FIELDNAME11 = 0;

  /**
   * @generated from field: int32 FIELD_name12 = 412;
   */
  FIELDName12 = 0;

  /**
   * @generated from field: int32 __field_name13 = 413;
   */
  FieldName13 = 0;

  /**
   * @generated from field: int32 __Field_name14 = 414;
   */
  FieldName14 = 0;

  /**
   * @generated from field: int32 field__name15 = 415;
   */
  fieldName15 = 0;

  /**
   * @generated from field: int32 field__Name16 = 416;
   */
  fieldName16 = 0;

  /**
   * @generated from field: int32 field_name17__ = 417;
   */
  fieldName17 = 0;

  /**
   * @generated from field: int32 Field_name18__ = 418;
   */
  FieldName18 = 0;

  constructor(data?: PartialMessage<TestAllTypesProto3>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "protobuf_test_messages.proto3.TestAllTypesProto3";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "optional_int32", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 2, name: "optional_int64", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
    { no: 3, name: "optional_uint32", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
    { no: 4, name: "optional_uint64", kind: "scalar", T: 4 /* ScalarType.UINT64 */ },
    { no: 5, name: "optional_sint32", kind: "scalar", T: 17 /* ScalarType.SINT32 */ },
    { no: 6, name: "optional_sint64", kind: "scalar", T: 18 /* ScalarType.SINT64 */ },
    { no: 7, name: "optional_fixed32", kind: "scalar", T: 7 /* ScalarType.FIXED32 */ },
    { no: 8, name: "optional_fixed64", kind: "scalar", T: 6 /* ScalarType.FIXED64 */ },
    { no: 9, name: "optional_sfixed32", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */ },
    { no: 10, name: "optional_sfixed64", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */ },
    { no: 11, name: "optional_float", kind: "scalar", T: 2 /* ScalarType.FLOAT */ },
    { no: 12, name: "optional_double", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
    { no: 13, name: "optional_bool", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
    { no: 14, name: "optional_string", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 15, name: "optional_bytes", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
    { no: 18, name: "optional_nested_message", kind: "message", T: TestAllTypesProto3_NestedMessage },
    { no: 19, name: "optional_foreign_message", kind: "message", T: ForeignMessage },
    { no: 21, name: "optional_nested_enum", kind: "enum", T: proto3.getEnumType(TestAllTypesProto3_NestedEnum) },
    { no: 22, name: "optional_foreign_enum", kind: "enum", T: proto3.getEnumType(ForeignEnum) },
    { no: 23, name: "optional_aliased_enum", kind: "enum", T: proto3.getEnumType(TestAllTypesProto3_AliasedEnum) },
    { no: 24, name: "optional_string_piece", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 25, name: "optional_cord", kind: "scalar", T: 9 /* ScalarType.STRING */ },
    { no: 27, name: "recursive_message", kind: "message", T: TestAllTypesProto3 },
    { no: 31, name: "repeated_int32", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true },
    { no: 32, name: "repeated_int64", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true },
    { no: 33, name: "repeated_uint32", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true },
    { no: 34, name: "repeated_uint64", kind: "scalar", T: 4 /* ScalarType.UINT64 */, repeated: true },
    { no: 35, name: "repeated_sint32", kind: "scalar", T: 17 /* ScalarType.SINT32 */, repeated: true },
    { no: 36, name: "repeated_sint64", kind: "scalar", T: 18 /* ScalarType.SINT64 */, repeated: true },
    { no: 37, name: "repeated_fixed32", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, repeated: true },
    { no: 38, name: "repeated_fixed64", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, repeated: true },
    { no: 39, name: "repeated_sfixed32", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, repeated: true },
    { no: 40, name: "repeated_sfixed64", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, repeated: true },
    { no: 41, name: "repeated_float", kind: "scalar", T: 2 /* ScalarType.FLOAT */, repeated: true },
    { no: 42, name: "repeated_double", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, repeated: true },
    { no: 43, name: "repeated_bool", kind: "scalar", T: 8 /* ScalarType.BOOL */, repeated: true },
    { no: 44, name: "repeated_string", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 45, name: "repeated_bytes", kind: "scalar", T: 12 /* ScalarType.BYTES */, repeated: true },
    { no: 48, name: "repeated_nested_message", kind: "message", T: TestAllTypesProto3_NestedMessage, repeated: true },
    { no: 49, name: "repeated_foreign_message", kind: "message", T: ForeignMessage, repeated: true },
    { no: 51, name: "repeated_nested_enum", kind: "enum", T: proto3.getEnumType(TestAllTypesProto3_NestedEnum), repeated: true },
    { no: 52, name: "repeated_foreign_enum", kind: "enum", T: proto3.getEnumType(ForeignEnum), repeated: true },
    { no: 54, name: "repeated_string_piece", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 55, name: "repeated_cord", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
    { no: 75, name: "packed_int32", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true },
    { no: 76, name: "packed_int64", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true },
    { no: 77, name: "packed_uint32", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true },
    { no: 78, name: "packed_uint64", kind: "scalar", T: 4 /* ScalarType.UINT64 */, repeated: true },
    { no: 79, name: "packed_sint32", kind: "scalar", T: 17 /* ScalarType.SINT32 */, repeated: true },
    { no: 80, name: "packed_sint64", kind: "scalar", T: 18 /* ScalarType.SINT64 */, repeated: true },
    { no: 81, name: "packed_fixed32", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, repeated: true },
    { no: 82, name: "packed_fixed64", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, repeated: true },
    { no: 83, name: "packed_sfixed32", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, repeated: true },
    { no: 84, name: "packed_sfixed64", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, repeated: true },
    { no: 85, name: "packed_float", kind: "scalar", T: 2 /* ScalarType.FLOAT */, repeated: true },
    { no: 86, name: "packed_double", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, repeated: true },
    { no: 87, name: "packed_bool", kind: "scalar", T: 8 /* ScalarType.BOOL */, repeated: true },
    { no: 88, name: "packed_nested_enum", kind: "enum", T: proto3.getEnumType(TestAllTypesProto3_NestedEnum), repeated: true },
    { no: 89, name: "unpacked_int32", kind: "scalar", T: 5 /* ScalarType.INT32 */, repeated: true, packed: false },
    { no: 90, name: "unpacked_int64", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true, packed: false },
    { no: 91, name: "unpacked_uint32", kind: "scalar", T: 13 /* ScalarType.UINT32 */, repeated: true, packed: false },
    { no: 92, name: "unpacked_uint64", kind: "scalar", T: 4 /* ScalarType.UINT64 */, repeated: true, packed: false },
    { no: 93, name: "unpacked_sint32", kind: "scalar", T: 17 /* ScalarType.SINT32 */, repeated: true, packed: false },
    { no: 94, name: "unpacked_sint64", kind: "scalar", T: 18 /* ScalarType.SINT64 */, repeated: true, packed: false },
    { no: 95, name: "unpacked_fixed32", kind: "scalar", T: 7 /* ScalarType.FIXED32 */, repeated: true, packed: false },
    { no: 96, name: "unpacked_fixed64", kind: "scalar", T: 6 /* ScalarType.FIXED64 */, repeated: true, packed: false },
    { no: 97, name: "unpacked_sfixed32", kind: "scalar", T: 15 /* ScalarType.SFIXED32 */, repeated: true, packed: false },
    { no: 98, name: "unpacked_sfixed64", kind: "scalar", T: 16 /* ScalarType.SFIXED64 */, repeated: true, packed: false },
    { no: 99, name: "unpacked_float", kind: "scalar", T: 2 /* ScalarType.FLOAT */, repeated: true, packed: false },
    { no: 100, name: "unpacked_double", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, repeated: true, packed: false },
    { no: 101, name: "unpacked_bool", kind: "scalar", T: 8 /* ScalarType.BOOL */, repeated: true, packed: false },
    { no: 102, name: "unpacked_nested_enum", kind: "enum", T: proto3.getEnumType(TestAllTypesProto3_NestedEnum), repeated: true, packed: false },
    { no: 56, name: "map_int32_int32", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "scalar", T: 5 /* ScalarType.INT32 */} },
    { no: 57, name: "map_int64_int64", kind: "map", K: 3 /* ScalarType.INT64 */, V: {kind: "scalar", T: 3 /* ScalarType.INT64 */} },
    { no: 58, name: "map_uint32_uint32", kind: "map", K: 13 /* ScalarType.UINT32 */, V: {kind: "scalar", T: 13 /* ScalarType.UINT32 */} },
    { no: 59, name: "map_uint64_uint64", kind: "map", K: 4 /* ScalarType.UINT64 */, V: {kind: "scalar", T: 4 /* ScalarType.UINT64 */} },
    { no: 60, name: "map_sint32_sint32", kind: "map", K: 17 /* ScalarType.SINT32 */, V: {kind: "scalar", T: 17 /* ScalarType.SINT32 */} },
    { no: 61, name: "map_sint64_sint64", kind: "map", K: 18 /* ScalarType.SINT64 */, V: {kind: "scalar", T: 18 /* ScalarType.SINT64 */} },
    { no: 62, name: "map_fixed32_fixed32", kind: "map", K: 7 /* ScalarType.FIXED32 */, V: {kind: "scalar", T: 7 /* ScalarType.FIXED32 */} },
    { no: 63, name: "map_fixed64_fixed64", kind: "map", K: 6 /* ScalarType.FIXED64 */, V: {kind: "scalar", T: 6 /* ScalarType.FIXED64 */} },
    { no: 64, name: "map_sfixed32_sfixed32", kind: "map", K: 15 /* ScalarType.SFIXED32 */, V: {kind: "scalar", T: 15 /* ScalarType.SFIXED32 */} },
    { no: 65, name: "map_sfixed64_sfixed64", kind: "map", K: 16 /* ScalarType.SFIXED64 */, V: {kind: "scalar", T: 16 /* ScalarType.SFIXED64 */} },
    { no: 66, name: "map_int32_float", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "scalar", T: 2 /* ScalarType.FLOAT */} },
    { no: 67, name: "map_int32_double", kind: "map", K: 5 /* ScalarType.INT32 */, V: {kind: "scalar", T: 1 /* ScalarType.DOUBLE */} },
    { no: 68, name: "map_bool_bool", kind: "map", K: 8 /* ScalarType.BOOL */, V: {kind: "scalar", T: 8 /* ScalarType.BOOL */} },
    { no: 69, name: "map_string_string", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
    { no: 70, name: "map_string_bytes", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 12 /* ScalarType.BYTES */} },
    { no: 71, name: "map_string_nested_message", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: TestAllTypesProto3_NestedMessage} },
    { no: 72, name: "map_string_foreign_message", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "message", T: ForeignMessage} },
    { no: 73, name: "map_string_nested_enum", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "enum", T: proto3.getEnumType(TestAllTypesProto3_NestedEnum)} },
    { no: 74, name: "map_string_foreign_enum", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "enum", T: proto3.getEnumType(ForeignEnum)} },
    { no: 111, name: "oneof_uint32", kind: "scalar", T: 13 /* ScalarType.UINT32 */, oneof: "oneof_field" },
    { no: 112, name: "oneof_nested_message", kind: "message", T: TestAllTypesProto3_NestedMessage, oneof: "oneof_field" },
    { no: 113, name: "oneof_string", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "oneof_field" },
    { no: 114, name: "oneof_bytes", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "oneof_field" },
    { no: 115, name: "oneof_bool", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "oneof_field" },
    { no: 116, name: "oneof_uint64", kind: "scalar", T: 4 /* ScalarType.UINT64 */, oneof: "oneof_field" },
    { no: 117, name: "oneof_float", kind: "scalar", T: 2 /* ScalarType.FLOAT */, oneof: "oneof_field" },
    { no: 118, name: "oneof_double", kind: "scalar", T: 1 /* ScalarType.DOUBLE */, oneof: "oneof_field" },
    { no: 119, name: "oneof_enum", kind: "enum", T: proto3.getEnumType(TestAllTypesProto3_NestedEnum), oneof: "oneof_field" },
    { no: 120, name: "oneof_null_value", kind: "enum", T: proto3.getEnumType(NullValue), oneof: "oneof_field" },
    { no: 201, name: "optional_bool_wrapper", kind: "message", T: BoolValue },
    { no: 202, name: "optional_int32_wrapper", kind: "message", T: Int32Value },
    { no: 203, name: "optional_int64_wrapper", kind: "message", T: Int64Value },
    { no: 204, name: "optional_uint32_wrapper", kind: "message", T: UInt32Value },
    { no: 205, name: "optional_uint64_wrapper", kind: "message", T: UInt64Value },
    { no: 206, name: "optional_float_wrapper", kind: "message", T: FloatValue },
    { no: 207, name: "optional_double_wrapper", kind: "message", T: DoubleValue },
    { no: 208, name: "optional_string_wrapper", kind: "message", T: StringValue },
    { no: 209, name: "optional_bytes_wrapper", kind: "message", T: BytesValue },
    { no: 211, name: "repeated_bool_wrapper", kind: "message", T: BoolValue, repeated: true },
    { no: 212, name: "repeated_int32_wrapper", kind: "message", T: Int32Value, repeated: true },
    { no: 213, name: "repeated_int64_wrapper", kind: "message", T: Int64Value, repeated: true },
    { no: 214, name: "repeated_uint32_wrapper", kind: "message", T: UInt32Value, repeated: true },
    { no: 215, name: "repeated_uint64_wrapper", kind: "message", T: UInt64Value, repeated: true },
    { no: 216, name: "repeated_float_wrapper", kind: "message", T: FloatValue, repeated: true },
    { no: 217, name: "repeated_double_wrapper", kind: "message", T: DoubleValue, repeated: true },
    { no: 218, name: "repeated_string_wrapper", kind: "message", T: StringValue, repeated: true },
    { no: 219, name: "repeated_bytes_wrapper", kind: "message", T: BytesValue, repeated: true },
    { no: 301, name: "optional_duration", kind: "message", T: Duration },
    { no: 302, name: "optional_timestamp", kind: "message", T: Timestamp },
    { no: 303, name: "optional_field_mask", kind: "message", T: FieldMask },
    { no: 304, name: "optional_struct", kind: "message", T: Struct },
    { no: 305, name: "optional_any", kind: "message", T: Any },
    { no: 306, name: "optional_value", kind: "message", T: Value },
    { no: 307, name: "optional_null_value", kind: "enum", T: proto3.getEnumType(NullValue) },
    { no: 311, name: "repeated_duration", kind: "message", T: Duration, repeated: true },
    { no: 312, name: "repeated_timestamp", kind: "message", T: Timestamp, repeated: true },
    { no: 313, name: "repeated_fieldmask", kind: "message", T: FieldMask, repeated: true },
    { no: 324, name: "repeated_struct", kind: "message", T: Struct, repeated: true },
    { no: 315, name: "repeated_any", kind: "message", T: Any, repeated: true },
    { no: 316, name: "repeated_value", kind: "message", T: Value, repeated: true },
    { no: 317, name: "repeated_list_value", kind: "message", T: ListValue, repeated: true },
    { no: 401, name: "fieldname1", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 402, name: "field_name2", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 403, name: "_field_name3", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 404, name: "field__name4_", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 405, name: "field0name5", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 406, name: "field_0_name6", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 407, name: "fieldName7", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 408, name: "FieldName8", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 409, name: "field_Name9", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 410, name: "Field_Name10", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 411, name: "FIELD_NAME11", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 412, name: "FIELD_name12", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 413, name: "__field_name13", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 414, name: "__Field_name14", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 415, name: "field__name15", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 416, name: "field__Name16", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 417, name: "field_name17__", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 418, name: "Field_name18__", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TestAllTypesProto3 {
    return new TestAllTypesProto3().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TestAllTypesProto3 {
    return new TestAllTypesProto3().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TestAllTypesProto3 {
    return new TestAllTypesProto3().fromJsonString(jsonString, options);
  }

  static equals(a: TestAllTypesProto3 | PlainMessage<TestAllTypesProto3> | undefined, b: TestAllTypesProto3 | PlainMessage<TestAllTypesProto3> | undefined): boolean {
    return proto3.util.equals(TestAllTypesProto3, a, b);
  }
}

/**
 * @generated from enum protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum
 */
export enum TestAllTypesProto3_NestedEnum {
  /**
   * @generated from enum value: FOO = 0;
   */
  FOO = 0,

  /**
   * @generated from enum value: BAR = 1;
   */
  BAR = 1,

  /**
   * @generated from enum value: BAZ = 2;
   */
  BAZ = 2,

  /**
   * Intentionally negative.
   *
   * @generated from enum value: NEG = -1;
   */
  NEG = -1,
}
// Retrieve enum metadata with: proto3.getEnumType(TestAllTypesProto3_NestedEnum)
proto3.util.setEnumType(TestAllTypesProto3_NestedEnum, "protobuf_test_messages.proto3.TestAllTypesProto3.NestedEnum", [
  { no: 0, name: "FOO" },
  { no: 1, name: "BAR" },
  { no: 2, name: "BAZ" },
  { no: -1, name: "NEG" },
]);

/**
 * @generated from enum protobuf_test_messages.proto3.TestAllTypesProto3.AliasedEnum
 */
export enum TestAllTypesProto3_AliasedEnum {
  /**
   * @generated from enum value: ALIAS_FOO = 0;
   */
  ALIAS_FOO = 0,

  /**
   * @generated from enum value: ALIAS_BAR = 1;
   */
  ALIAS_BAR = 1,

  /**
   * @generated from enum value: ALIAS_BAZ = 2;
   */
  ALIAS_BAZ = 2,

  /**
   * @generated from enum value: MOO = 2;
   */
  MOO = 2,

  /**
   * @generated from enum value: moo = 2;
   */
  moo = 2,

  /**
   * @generated from enum value: bAz = 2;
   */
  bAz = 2,
}
// Retrieve enum metadata with: proto3.getEnumType(TestAllTypesProto3_AliasedEnum)
proto3.util.setEnumType(TestAllTypesProto3_AliasedEnum, "protobuf_test_messages.proto3.TestAllTypesProto3.AliasedEnum", [
  { no: 0, name: "ALIAS_FOO" },
  { no: 1, name: "ALIAS_BAR" },
  { no: 2, name: "ALIAS_BAZ" },
  { no: 2, name: "MOO" },
  { no: 2, name: "moo" },
  { no: 2, name: "bAz" },
]);

/**
 * @generated from message protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage
 */
export class TestAllTypesProto3_NestedMessage extends Message<TestAllTypesProto3_NestedMessage> {
  /**
   * @generated from field: int32 a = 1;
   */
  a = 0;

  /**
   * @generated from field: protobuf_test_messages.proto3.TestAllTypesProto3 corecursive = 2;
   */
  corecursive?: TestAllTypesProto3;

  constructor(data?: PartialMessage<TestAllTypesProto3_NestedMessage>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "protobuf_test_messages.proto3.TestAllTypesProto3.NestedMessage";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "a", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
    { no: 2, name: "corecursive", kind: "message", T: TestAllTypesProto3 },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): TestAllTypesProto3_NestedMessage {
    return new TestAllTypesProto3_NestedMessage().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): TestAllTypesProto3_NestedMessage {
    return new TestAllTypesProto3_NestedMessage().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): TestAllTypesProto3_NestedMessage {
    return new TestAllTypesProto3_NestedMessage().fromJsonString(jsonString, options);
  }

  static equals(a: TestAllTypesProto3_NestedMessage | PlainMessage<TestAllTypesProto3_NestedMessage> | undefined, b: TestAllTypesProto3_NestedMessage | PlainMessage<TestAllTypesProto3_NestedMessage> | undefined): boolean {
    return proto3.util.equals(TestAllTypesProto3_NestedMessage, a, b);
  }
}

/**
 * @generated from message protobuf_test_messages.proto3.ForeignMessage
 */
export class ForeignMessage extends Message<ForeignMessage> {
  /**
   * @generated from field: int32 c = 1;
   */
  c = 0;

  constructor(data?: PartialMessage<ForeignMessage>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "protobuf_test_messages.proto3.ForeignMessage";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
    { no: 1, name: "c", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ForeignMessage {
    return new ForeignMessage().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ForeignMessage {
    return new ForeignMessage().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ForeignMessage {
    return new ForeignMessage().fromJsonString(jsonString, options);
  }

  static equals(a: ForeignMessage | PlainMessage<ForeignMessage> | undefined, b: ForeignMessage | PlainMessage<ForeignMessage> | undefined): boolean {
    return proto3.util.equals(ForeignMessage, a, b);
  }
}

/**
 * @generated from message protobuf_test_messages.proto3.NullHypothesisProto3
 */
export class NullHypothesisProto3 extends Message<NullHypothesisProto3> {
  constructor(data?: PartialMessage<NullHypothesisProto3>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "protobuf_test_messages.proto3.NullHypothesisProto3";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): NullHypothesisProto3 {
    return new NullHypothesisProto3().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): NullHypothesisProto3 {
    return new NullHypothesisProto3().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): NullHypothesisProto3 {
    return new NullHypothesisProto3().fromJsonString(jsonString, options);
  }

  static equals(a: NullHypothesisProto3 | PlainMessage<NullHypothesisProto3> | undefined, b: NullHypothesisProto3 | PlainMessage<NullHypothesisProto3> | undefined): boolean {
    return proto3.util.equals(NullHypothesisProto3, a, b);
  }
}

/**
 * @generated from message protobuf_test_messages.proto3.EnumOnlyProto3
 */
export class EnumOnlyProto3 extends Message<EnumOnlyProto3> {
  constructor(data?: PartialMessage<EnumOnlyProto3>) {
    super();
    proto3.util.initPartial(data, this);
  }

  static readonly runtime: typeof proto3 = proto3;
  static readonly typeName = "protobuf_test_messages.proto3.EnumOnlyProto3";
  static readonly fields: FieldList = proto3.util.newFieldList(() => [
  ]);

  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): EnumOnlyProto3 {
    return new EnumOnlyProto3().fromBinary(bytes, options);
  }

  static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): EnumOnlyProto3 {
    return new EnumOnlyProto3().fromJson(jsonValue, options);
  }

  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): EnumOnlyProto3 {
    return new EnumOnlyProto3().fromJsonString(jsonString, options);
  }

  static equals(a: EnumOnlyProto3 | PlainMessage<EnumOnlyProto3> | undefined, b: EnumOnlyProto3 | PlainMessage<EnumOnlyProto3> | undefined): boolean {
    return proto3.util.equals(EnumOnlyProto3, a, b);
  }
}

/**
 * @generated from enum protobuf_test_messages.proto3.EnumOnlyProto3.Bool
 */
export enum EnumOnlyProto3_Bool {
  /**
   * @generated from enum value: kFalse = 0;
   */
  kFalse = 0,

  /**
   * @generated from enum value: kTrue = 1;
   */
  kTrue = 1,
}
// Retrieve enum metadata with: proto3.getEnumType(EnumOnlyProto3_Bool)
proto3.util.setEnumType(EnumOnlyProto3_Bool, "protobuf_test_messages.proto3.EnumOnlyProto3.Bool", [
  { no: 0, name: "kFalse" },
  { no: 1, name: "kTrue" },
]);
